import Vue from 'vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
axios.interceptors.request.use(
    config => {
        if (localStorage.getItem('userToken') ||localStorage.getItem('userName')) {
            config.headers.userToken = localStorage.getItem('userToken')
            config.headers.userName = localStorage.getItem('userName')
        }
        return config;
    }
)
Vue.use(VueAxios, axios)